package com.jxc.model.po;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/***********************************************************************
 * Module:  OrderlistItem.java
 * Author:  Tino
 * Purpose: Defines the Class OrderlistItem
 ***********************************************************************/

/**
 * 进货明细
 * 
 * @pdOid 4b5e9cb7-b6c6-4657-bdcd-f14a2c9f4d8f
 */
@Entity
@Table(name = "RKGL_ORDERLIST_ITEM")
public class OrderlistItem extends IdEntity implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -948871215252152912L;
	/**
	 * 商品
	 * 
	 * @pdOid 56e6b1f8-caf9-4fbb-88bc-5d81b08f6185
	 */
	private Goods goods;
	/**
	 * 进货数量
	 * 
	 * @pdOid 7e2aedaa-a6ff-47a7-aced-4c49249f6f68
	 */
	private Integer num;
	/**
	 * 进货总额
	 * 
	 * @pdOid ed86ae29-fedd-4e05-b6c6-dba934efd921
	 */
	private Double total;
	/**
	 * 进价
	 * 
	 */
	private Double buyPrice;
	/**
	 * 进货单
	 * 
	 * @pdOid 4a88ddbf-6eed-41ee-b078-740cfc1daad7
	 */
	private Orderlist orderlist;
	/**
	 * 备注
	 * 
	 */
	private String remark;

	@Column(name = "BUY_PRICE", length = 10, precision = 2)
	public Double getBuyPrice() {
		return buyPrice;
	}

	public void setBuyPrice(Double buyPrice) {
		this.buyPrice = buyPrice;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "GOODS_ID")
	public Goods getGoods() {
		return goods;
	}

	public void setGoods(Goods goods) {
		this.goods = goods;
	}

	@Column(name = "NUM", length = 10)
	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}

	@Column(name = "TOTAL", length = 10, precision = 2)
	public Double getTotal() {
		return total;
	}

	public void setTotal(Double total) {
		this.total = total;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ORDERLIST_ID")
	public Orderlist getOrderlist() {
		return orderlist;
	}

	public void setOrderlist(Orderlist orderlist) {
		this.orderlist = orderlist;
	}

	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

}